#include <stdio.h>
#include "Player.h"
#include <string.h>
/* run this program using the console pauser or add your own getch, system("pause") or input loop */

int main(int argc, char *argv[]) {
	int choice=0;
	Player players[100];
    int numPlayers = 0;
    do{
	welcome();
	scanf("%d",&choice);
    switch (choice) {
        case 1:{
            addPlayer(players, &numPlayers);
            do{
			printf("是否还要继续录入 是/1 否/2:");
            scanf("%d",&choice);
			switch(choice){
            	case 1:addPlayer(players, &numPlayers);
            	break;
				case 2:
				break;	
			}
        }while(choice!=2);
        }break;
        case 2:
            deletePlayer(players, &numPlayers);
            break;
        case 3:
            modifyPlayer(players, numPlayers);
            break;
        case 4:
            searchPlayer(players, numPlayers);
            break;
        case 5:{
        	const char*Teamdate ="Teamdate.txt";
	        print_Player_Date(Teamdate);
	        break;
        }
		case 0:
			printf("感谢使用\n");
            break;
        default:
            printf("请选择有效操作！\n");
            break;
		}
		}while(choice!=0);
	return 0;
}
